<?
	/**********   Banners   **********/
	$w = $this->aDatos[$cTemplateId][nWidth] ? $this->aDatos[$cTemplateId][nWidth]: 200;
	$h = $this->aDatos[$cTemplateId][nHeight] ? $this->aDatos[$cTemplateId][nHeight]: 300;
	
	//include_once('contenido_00.php');
	$lang = $this->getLanguage();
	
	$cClass = getParam ( 'cClass', $this->aDatos[$cTemplateId][aCelda][cClass] );
	$bPop = getParam ('pop', false);
	
	$aTitulos = array(	"glosario" => "Glosario",
					"webs" => "Webs de interes",
					"infos" => "Informacion relacionada",
					"expresiones" => "Expresiones Utiles"
					);
	$cTituloBanner = $aTitulos[$cClass];
	usort( $this->aDatos[$cTemplateId][aContenidos] , comparaContenido );
	
?>
<div class="banner">
	<div class="banner_titulo">
	<?
		if ( $bPop )
			echo $cClass;
		else
			echo "<img src='imagenes/banner_".$cClass."_$lang.gif' width='143' style='border:none' alt='$cClass' />";
	?>
	</div>
	<div class="banner_contenido">
		<?
		$cParams = '&nMaxItems=0&amp;ncMenu=' . getParam(ncMenu) . '&amp;ncTipoContenido=' . $this->aDatos[$cTemplateId][ncTipoContenido] . '&amp;ncRotulo=' . $this->aDatos[$cTemplateId][ncRotulo] ;
		if ( $this->aDatos[$cTemplateId][nMaxItems] )
			$bItems = $nMaxItems = $this->aDatos[$cTemplateId][nMaxItems] ;
		else
			$nMaxItems = count( $this->aDatos[$cTemplateId][aContenidos] );
		for( $nIndex = 0; $nIndex < $nMaxItems;  $nIndex++ )
		{
			$aContenido = $this->aDatos[$cTemplateId][aContenidos][$nIndex];
			$cHRef = trim(extractLanguage($aContenido[cLink], $lang));
			if ( substr($cHRef , 0,4)  != 'http'  && substr($cHRef , 0,1)  != '.' && substr($cHRef , 0,1)  != '/' && substr($cHRef , 0,1)  != '?'  )
				$cHRef = 'http://' . $cHRef ;
			
			$cStyle = ( !$nIndex )? "style='border:none'" : "";
			echo "<div class='banner_item' $cStyle>";
			if ( $aContenido[bMuestraTexto] ) 
			{
				echo "	<div class='banner_cdContenido'>". extractLanguage($aContenido[cdContenido], $lang) ."</div>";
				echo "	<div class='banner_cDescripcion'>". MarkDown(extractLanguage($aContenido[cDescripcion], $lang)) ."</div>";
			} else
				echo "	<div class='banner_cdContenido'><a target='_blank' class='a_banner' href='$cHRef' >". extractLanguage($aContenido[cdContenido], $lang) ."</a></div>";
			echo "</div>";
		}
		if ( $bItems  ) 
			echo "	<div class='banner_item' style='text-transform:lowercase; border-top:1px solid #dadbcb;'><a class='a_banner' href='#' onclick=\"openPopup('?ac=contenido&aModos=3&mo=portal&pop=true&cClass=$cClass&rf=action$cParams' , '', $w, $h );return false;\" >". mostrar_termino('LBL_Ver_Mas') ."</a></div>";		
		?>
	</div>
</div>